package cn.turboinfo.dongying.api.entity.common.enumeration.shop;

import lombok.extern.slf4j.Slf4j;
import net.sunshow.toolkit.core.base.enums.BaseEnum;
import net.sunshow.toolkit.core.base.enums.BaseEnumHelper;

import java.util.List;

/**
 * 企业审核状态
 *
 * @author 海
 */
@Slf4j
public enum ShopAuditStatus implements BaseEnum {

    INIT(0, "注册申请"),
    REVIEWED(10, "审核通过"),

    NOT_PASS(20, "审核未通过"),

    AGAIN(30, "再次提交"),

    //注销申请
    CANCEL_APPLY(40, "注销申请"),

    //注销
    CANCEL(50, "审核注销通过");

    private int value;
    private String name;

    ShopAuditStatus(int value, String name) {
        this.value = value;
        this.name = name;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public String toString() {
        return name;
    }

    public static ShopAuditStatus get(int value) {
        return BaseEnumHelper.getByValue(value, values());
    }

    public static List<ShopAuditStatus> list() {
        return BaseEnumHelper.getList(values());
    }

    public static List<ShopAuditStatus> listAll() {
        return BaseEnumHelper.getAllList(values());
    }
}
